<?php

namespace common\models\personnel;


/**
 * This is the model class for table "{{%oauth_client}}".
 *
 * @property string $id
 * @property string $title 标题
 * @property string $client_id
 * @property string $client_secret
 * @property string $redirect_uri 回调Url
 * @property string $remark 备注
 * @property string $group 组别
 * @property int $status 状态[-1:删除;0:禁用;1启用]
 * @property string $created_at 创建时间
 * @property string $updated_at 修改时间
 */
class Members extends \common\models\base\BaseModel
{


    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return '{{%by_member}}';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [[ 'id','personnel_id','group','leader','status', 'created_at', 'updated_at'], 'integer'],
        ];
    }
    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'personnel_id'=>'成员名称',
            'leader'=>'是否是组长',
            'status' => '状态',
            'created_at' => '创建时间',
            'updated_at' => '修改时间',
        ];
    }

    public function getCate()
    {
        return $this->hasOne(Personnel::class, ['personnel_id' => 'personnel_id']);
    }
}
